#ifndef __WSDL_HANDLER_H__
#define __WSDL_HANDLER_H__
#include<xercesc/sax2/DefaultHandler.hpp>
#include<xercesc\sax2\Attributes.hpp>
#include"../Util/CharUtil.h"
#include"../Service.h"
#include<regex>
using namespace xercesc;

typedef const XMLCh* const XercesString;
class WsdlHandler:public DefaultHandler
{
private:
	vector<Service*> m_Services;
	string m_Last;
	Service* m_pLast;
	bool m_b;
	bool m_bIn;
public:
	WsdlHandler(void);
	~WsdlHandler(void);

	virtual void startDocument();
	virtual void endDocument();
    
	virtual void startElement(
		const XMLCh* const uri, 
		const XMLCh* const localname, 
		const XMLCh* const qname, 
		const Attributes& attrs);
    
	virtual void endElement(
		const XMLCh* const uri, 
		const XMLCh* const localname,
		const XMLCh* const qname);

	void SaveAsMyFormat(const char* filename);

	virtual void characters(
		const XMLCh* const chars,
		XMLSize_t length);
};
#endif
